package cn.lynu.study.practice11_7;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
public class Time2 {
	public static void main(String[] args) {
		LocalDateTime dateStart = LocalDateTime.now();
		LocalDateTime dateEnd = LocalDateTime.of(2022, 11, 7, 22, 33, 0);
		long hours = dateStart.until(dateEnd, ChronoUnit.HOURS);
		long minutes = dateStart.until(dateEnd, ChronoUnit.MINUTES);
		System.out.println(dateStart + "到" + dateEnd + "距离时间为");
		
		System.out.println(hours + "小时");
		System.out.println(minutes + "分");
	}
}
